<template>
  <div class="wrap">
    <div class="con">
      <div class="tabLeft">
        <ul>
          <li
            :class="tabNum == 0 ? 'seleTabUserAccount pseudo' : 'tabUserAccount'"
            @click="tabSwitch(0)"
          >个人账户</li>
          <li
            :class="tabNum == 1 ? 'seleTabUserProject  pseudo' : 'tabUserProject '"
            @click="tabSwitch(1)"
          >项目课题中心</li>
          <li
            :class="tabNum == 2 ? 'seleTabUserTechnology pseudo' : 'tabUserTechnology'"
            @click="tabSwitch(2)"
          >技术分享</li>
          <li
            :class="tabNum == 3 ? 'seleTabUserResume pseudo' : 'tabUserResume'"
            @click="tabSwitch(3)"
          >个人履历</li>
          <li
            :class="tabNum == 4 ? 'seleTabUserApprentice pseudo' : 'tabUserApprentice'"
            @click="tabSwitch(4)"
          >拜师消息</li>
        </ul>
      </div>
      <div class="tabRight">
        <!-- 个人账户 -->
        <div class="userAccountCon" v-if="tabNum == 0">
          <h2>个人账户</h2>
          <span>懒币数量：</span>
          <p>888888</p>
          <div class="btnCon">
            <button class="cBtn">充值</button>
            <button class="tBtn">提现</button>
          </div>
          <span>账户明细：</span>
          <table class="tPerson">
            <tr class="tHead">
              <td>充值</td>
              <td>提现</td>
              <td>被打赏情况</td>
              <td>被打赏懒币数</td>
            </tr>
            <tr>
              <td>+20</td>
              <td>20</td>
              <td>8次</td>
              <td>9999</td>
            </tr>
          </table>
        </div>

        <!-- 项目课题中心 -->
        <div class="userProjectCon" v-if="tabNum == 1">
          <h2>项目课题中心</h2>
          <el-tabs v-model="activeName" :stretch="true" class="tabs">
            <!-- 发布课题或项目任务 -->
            <el-tab-pane label="发布课题或项目任务" name="first">
              <span>项目或课程名称</span>
              <p>项目或课程名称</p>
              <span>项目或课题介绍</span>
              <p class="p1">项目或课题介绍</p>
              <span>项目或课程需求</span>
              <p class="p1">项目或课程需求</p>
              <div>
                <el-button type="primary" class="publishBtn">发布</el-button>
              </div>
            </el-tab-pane>

            <!-- 已发布任务情况 -->
            <el-tab-pane label="已发布任务情况" name="second">
              <div class="conFour">
                <table class="tbHead">
                  <tr>
                    <td>项目名称</td>
                    <td>人员详细信息</td>
                    <td>作业进度</td>
                    <td>项目人数</td>
                  </tr>
                </table>
                <el-divider class="line"></el-divider>
                <table class="tbMain" v-for="prodata in prodatas" :key="prodata.name">
                  <tr>
                    <td>{{prodata.name}}</td>
                    <td>
                      <el-button type="primary" class="examBtn">查看</el-button>
                    </td>
                    <td>{{prodata.pace}}</td>
                    <td>{{prodata.num}}</td>
                  </tr>
                </table>
              </div>
            </el-tab-pane>

            <!-- 结束任务情况 -->
            <el-tab-pane label="结束任务情况" name="third">
              <div class="conFour">
                <table class="tbHead">
                  <tr>
                    <td>项目名称</td>
                    <td>人员详细信息</td>
                    <td>项目进度</td>
                    <td>项目人数</td>
                  </tr>
                </table>
                <el-divider class="line"></el-divider>
                <table class="tbMain" v-for="endProdata in endProdatas" :key="endProdata.name">
                  <tr>
                    <td>{{endProdata.name}}</td>
                    <td>
                      <el-button type="primary" class="examBtn">查看</el-button>
                    </td>
                    <td class="endP">{{endProdata.pace}}</td>
                    <td>{{endProdata.num}}</td>
                  </tr>
                </table>
              </div>
            </el-tab-pane>
          </el-tabs>
        </div>

        <!-- 技术分享 -->
        <div class="userTechnology" v-if="tabNum == 2">
          <!-- 项目课题中心 -->
          <div v-if="tecFlag === 0">
            <h2>项目课题中心</h2>
            <div class="rad"></div>
            <h2 @click="tecSwitch(1)" class="tech2">分享课题</h2>
            <div class="rad"></div>
            <h2 @click="tecSwitch(2)" class="tech2">分享课题情况</h2>
          </div>
          <!-- 分享课题 -->
          <div v-if="tecFlag === 1">
            <h2>分享课题</h2>
            <span>课题名称</span>
            <p>课题名称</p>
            <span>课题技术概要</span>
            <p class="p1">课题技术概要</p>
            <span>分享时间</span>
            <p>分享时间</p>
            <span>懒币价格设定</span>
            <p>懒币价格设定</p>
            <span>技术练习题设计</span>
            <p class="p1">技术练习题设计</p>
            <span>截止考核时间</span>
            <p>截止考核时间</p>
            <el-button type="primary" class="tecBtn tecle">提交审核</el-button>
            <el-button type="warning" class="tecBtn tecri" @click="tecSwitch(0)">放回上级</el-button>
          </div>
          <!--  分享课题情况-->
          <div v-if="tecFlag === 2">
            <h2>分享课题情况</h2>
            <el-tabs v-model="activeName2" :stretch="true" class="tabs">
              <!-- 课题、考核、收入列表 -->
              <el-tab-pane label="课题、考核、收入列表" name="first">
                <select class="tecSel" v-model="tecSelect">
                  <option selected value>已分享课题列表</option>
                  <option value="1">参加人员列表</option>
                  <option value="2">习题考核列表</option>
                </select>
                <!-- 已分享课题列表 -->
                <div v-if="tecSelect === ''">
                  <div class="rad"></div>
                  <h2 class="tech2">响应式Web设计</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">算法和数据结构</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">前端库和框架</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">数据可视化</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">API和微服务</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">信息安全和质量保证</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">面试攻略</h2>
                  <div class="rad"></div>
                  <h2 class="tech2">入职指南</h2>
                </div>
                <!--参加人员列表  -->
                <div v-if="tecSelect === '1'">
                  <div class="conThree">
                    <table class="tbHead">
                      <tr>
                        <td>课题名称</td>
                        <td>参与人员</td>
                        <td>收入</td>
                      </tr>
                    </table>
                    <el-divider class="line"></el-divider>
                    <table class="tbMain" v-for="tecdata in tecdatas" :key="tecdata.name">
                      <tr>
                        <td>{{tecdata.name}}</td>
                        <td class="liBtn">
                          <el-button type="primary">查看</el-button>
                        </td>
                        <td>{{tecdata.money}}</td>
                      </tr>
                    </table>
                  </div>
                </div>
                <!-- 习题考核列表 -->
                <div v-if="tecSelect === '2'">
                  <div class="conThree">
                    <table class="tbHead">
                      <tr>
                        <td>习题名称</td>
                        <td>参与人员</td>
                        <td>评语</td>
                      </tr>
                    </table>
                    <el-divider class="line"></el-divider>
                    <table class="tbMain" v-for="tecdata in tecdatas2" :key="tecdata.name">
                      <tr>
                        <td>{{tecdata.name}}</td>
                        <td>{{tecdata.personName}}</td>
                        <td class="liBtn">
                          <el-button type="danger"  @click="tecComment">评语</el-button>
                        </td>
                      </tr>
                    </table>
                  </div>
                </div>
                <!-- 习题考核列表 -->
              </el-tab-pane>

              <!--  申报分享情况-->
              <el-tab-pane label="申报分享情况" name="second">
                <div class="conTwo">
                  <table class="tbHead">
                    <tr>
                      <td>网申分享课题</td>
                      <td>审核情况</td>
                    </tr>
                  </table>
                  <el-divider class="line"></el-divider>
                  <table class="tbMain" v-for="tecdata in tecdatas3" :key="tecdata.name">
                    <tr>
                      <td>{{tecdata.name}}</td>
                      <td class="endP">{{tecdata.exam}}</td>
                    </tr>
                  </table>
                </div>
              </el-tab-pane>

              <!-- 未分享课题报名情况 -->
              <el-tab-pane label="未分享课题报名情况" name="third">
                <div class="conThree">
                  <table class="tbHead">
                    <tr>
                      <td>未分享课题</td>
                      <td>报名人数</td>
                      <td>操作</td>
                    </tr>
                  </table>
                  <el-divider class="line"></el-divider>
                  <table class="tbMain" v-for="tecdata in tecdatas4" :key="tecdata.name">
                    <tr>
                      <td>{{tecdata.name}}</td>
                      <td class="endP">{{tecdata.num}}</td>
                      <td class="liBtn">
                        <el-button type="primary" >分享</el-button>
                        <el-button type="danger"  @click="del(tecdata.id)">删除</el-button>
                      </td>
                    </tr>
                  </table>
                </div>
              </el-tab-pane>
            </el-tabs>
            <el-button type="warning" class="tecBtn tecri" @click="tecSwitch(0)">放回上级</el-button>
          </div>
        </div>

        <!-- 个人履历 -->
        <div class="userResume" v-if="tabNum == 3">
          <h2>个人履历</h2>
          <span>姓名：</span>
          <p>888888</p>
          <span>任职公司：</span>
          <p>Andrew</p>
          <span>职位：</span>
          <p>999</p>
          <span>联系电话：</span>
          <p>666</p>
          <span>邮箱：</span>
          <p>邮箱：</p>
          <span>毕业院校及专业：</span>
          <p>毕业院校及专业：</p>
          <span>毕业时间：</span>
          <p>毕业时间：</p>
          <span>擅长技术：</span>
          <p>擅长技术：</p>
          <span>分享课题：</span>
          <p class="p1">分享课题</p>
          <span>评价：</span>
          <p class="p1">评价</p>
          <div class="select">
            <select class="file">
              <option value="0">PDF格式</option>
              <option value="1">Word格式</option>
              <option value="2">PDF格式</option>
            </select>
            <el-button type="warning" class="backBtn1">导出文件</el-button>
          </div>
        </div>

        <!-- 拜师消息 -->
        <div class="userResume" v-if="tabNum == 4">
          <h2>拜师消息</h2>
          <el-tabs v-model="activeName3" :stretch="true" class="tabs" name="first">
            <!-- 拜师人员消息 -->
            <el-tab-pane label="拜师人员消息" name="first">
              <div v-if="apprentice === 0">
                <div class="conThree">
                  <table class="tbHead">
                    <tr>
                      <td>拜师人员名称</td>
                      <td>简历</td>
                      <td>是否接受拜师</td>
                    </tr>
                  </table>
                  <el-divider class="line"></el-divider>
                  <table class="tbMain" v-for="apprentice in apprentices" :key="apprentice.name">
                    <tr>
                      <td>{{apprentice.name}}</td>
                      <td class="liBtn">
                        <el-button type="warning"  @click="seeResume(1)">查看</el-button>
                      </td>
                      <td class="liBtn">
                        <el-button type="primary" >是</el-button>
                        <el-button type="danger" >否</el-button>
                      </td>
                    </tr>
                  </table>
                </div>
              </div>
              <div v-if="apprentice === 1">
                <h2>拜师人员简历</h2>
                <span>姓名</span>
                <p>张三</p>
                <span>联系电话</span>
                <p>888888</p>
                <span>邮箱</span>
                <p>zs@qq.com</p>
                <span>院校或公司</span>
                <p>北京清华大学</p>
                <span>专业或职位</span>
                <p>计算机与编程</p>
                <span>备注</span>
                <p>备注</p>
                <el-button type="warning" class="backBtn" @click="seeResume(0)">放回上级</el-button>
              </div>
            </el-tab-pane>
            <!--  徒弟列表-->
            <el-tab-pane label="徒弟列表" name="second">
              <div v-if="apprentice2 === 0">
                <div class="conTwo">
                  <table class="tbHead">
                    <tr>
                      <td>徒弟人员名称</td>
                      <td>徒弟成长履历表</td>
                    </tr>
                  </table>
                  <el-divider class="line"></el-divider>
                  <table class="tbMain" v-for="apprentice in apprentices2" :key="apprentice.name">
                    <tr>
                      <td>{{apprentice.name}}</td>
                      <td class="liBtn">
                        <el-button type="warning"  @click="seeResume2(1)">查看</el-button>
                      </td>
                    </tr>
                  </table>
                </div>
              </div>
              <div v-if="apprentice2 === 1">
                <h2>拜师人员简历</h2>
                <span>姓名</span>
                <p>张三</p>
                <span>联系电话</span>
                <p>888888</p>
                <span>邮箱</span>
                <p>zs@qq.com</p>
                <span>院校或公司</span>
                <p>北京清华大学</p>
                <span>专业或职位</span>
                <p>计算机与编程</p>
                <span>已完成课程</span>
                <p>已完成课程</p>
                <span>已完成项目</span>
                <p>已完成项目</p>
                <el-button type="warning" class="backBtn" @click="seeResume2(0)">放回上级</el-button>
              </div>
            </el-tab-pane>
          </el-tabs>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      stretch: "",
      tabNum: 0,
      activeName: "first",
      activeName2: "first",
      activeName3: "first",
      tecFlag: 0,
      tecSelect: "",
      apprentice: 0,
      apprentice2: 0,
      prodatas: [
        {
          name: "建立购物网站",
          pace: "进行中",
          num: 200
        },
        {
          name: "建立购物网站",
          pace: "进行中",
          num: 200
        },
        {
          name: "建立购物网站",
          pace: "进行中",
          num: 200
        },
        {
          name: "建立购物网站",
          pace: "进行中",
          num: 200
        }
      ],
      endProdatas: [
        {
          name: "建立购物网站",
          pace: "未完成",
          num: 200
        },
        {
          name: "建立购物网站",
          pace: "未完成",
          num: 200
        },
        {
          name: "建立购物网站",
          pace: "未完成",
          num: 200
        },
        {
          name: "建立购物网站",
          pace: "未完成",
          num: 200
        }
      ],
      tecdatas: [
        {
          name: "建立购物网站",
          money: 200 + "懒币"
        },
        {
          name: "建立购物网站",
          money: 200 + "懒币"
        },
        {
          name: "建立购物网站",
          money: 200 + "懒币"
        },
        {
          name: "建立购物网站",
          money: 200 + "懒币"
        }
      ],
      tecdatas2: [
        {
          name: "建立购物网站",
          personName: "张三"
        },
        {
          name: "建立购物网站",
          personName: "张三"
        },
        {
          name: "建立购物网站",
          personName: "张三"
        },
        {
          name: "建立购物网站",
          personName: "张三"
        }
      ],
      tecdatas3: [
        {
          name: "建立购物网站",
          exam: "未通过"
        },
        {
          name: "建立购物网站",
          exam: "未通过"
        },
        {
          name: "建立购物网站",
          exam: "未通过"
        },
        {
          name: "建立购物网站",
          exam: "未通过"
        },
        {
          name: "建立购物网站",
          exam: "未通过"
        },
        {
          name: "建立购物网站",
          exam: "未通过"
        }
      ],
      tecdatas4: [
        {
          id: 0,
          name: "建立购物网站",
          num: 100 + "人"
        },
        {
          id: 1,
          name: "建立购物网站",
          num: 100 + "人"
        },
        {
          id: 2,
          name: "建立购物网站",
          num: 100 + "人"
        },
        {
          id: 3,
          name: "建立购物网站",
          num: 100 + "人"
        },
        {
          id: 4,
          name: "建立购物网站",
          num: 100 + "人"
        },
        {
          id: 5,
          name: "建立购物网站",
          num: 100 + "人"
        }
      ],
      apprentices: [
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        }
      ],
      apprentices2: [
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        },
        {
          name: "张三"
        }
      ]
    };
  },
  methods: {
    tabSwitch(num) {
      this.tabNum = num;
    },
    tecSwitch(num) {
      this.tecFlag = num;
    },
    tecComment() {
      const h = this.$createElement;
      this.$msgbox({
        title: "考核评价",
        message: h(
          "p",
          {
            style:
              "color: black; font-weight: 600; font-size: 16px; text-align: left;"
          },
          "评语:"
        ),
        showInput: true,
        inputType: "textarea",
        center: true,
        confirmButtonText: "确定",
        roundButton: true
      });
    },
    del(id) {
      this.tecdatas4.some((tecdata, i) => {
        if (tecdata.id == id) {
          this.tecdatas4.splice(i, 1);
          return true;
        }
      });
    },
    seeResume(num) {
      this.apprentice = num;
    },
    seeResume2(num) {
      this.apprentice2 = num;
    }
  }
};
</script>

<style scoped>
/* 外部框架 */
.wrap {
  width: 100%;
  height: 100%;
}
.head {
  width: 100%;
  height: 100px;
  background-color: aqua;
}
.con {
  display: flex;
  width: 1200px;
  margin: 20px auto 0;
  box-shadow: 1px 3px 9px #ddd;
  border-radius: 10px;
}
/*  */

/* 左部框架 */
.tabLeft {
  background-color: #f2f6f7;
}
.tabLeft li {
  position: relative;
  width: 210px;
  padding-left: 30px;
  line-height: 85px;
  font-size: 21px;
  color: #b3bdc9;
  text-align: center;
  list-style: none;
}

.tabUserAccount {
  background: url("../assets/tabUserAccount.png") 50px center no-repeat;
  background-size: 26px 28px;
}

.seleTabUserAccount {
  color: #0087cf !important;
  background: #fff url("../assets/seleTabUserAccount.png") 50px center no-repeat;
  background-size: 26px 28px;
}

.tabUserProject {
  background: url("../assets/tabUserProject.png") 45px center no-repeat;
  background-size: 26px 28px;
}

.seleTabUserProject {
  color: #0087cf !important;
  background: #fff url("../assets/seleTabUserProject.png") 45px center no-repeat;
  background-size: 26px 28px;
}

.tabUserTechnology {
  background: url("../assets/tabUserTechnology.png") 50px center no-repeat;
  background-size: 26px 28px;
}

.seleTabUserTechnology {
  color: #0087cf !important;
  background: #fff url("../assets/seleTabUserTechnology.png") 50px center
    no-repeat;
  background-size: 26px 28px;
}

.tabUserResume {
  background: url("../assets/tabUserResume.png") 50px center no-repeat;
  background-size: 26px 28px;
}

.seleTabUserResume {
  color: #0087cf !important;
  background: #fff url("../assets/seleTabUserResume.png") 50px center no-repeat;
  background-size: 26px 28px;
}

.tabUserApprentice {
  background: url("../assets/tabUserApprentice.png") 50px center no-repeat;
  background-size: 26px 28px;
}

.seleTabUserApprentice {
  color: #0087cf !important;
  background: #fff url("../assets/seleTabUserApprentice.png") 50px center
    no-repeat;
  background-size: 26px 28px;
}

.pseudo::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0px;
  width: 8px;
  height: 85px;
  background-color: #0087cf;
}
/*  */

/*右部框架 */
.tabRight {
  width: 100%;
  background-color: #fff;
}

.tabRight h2 {
  font-weight: 500;
  font-size: 28px;
  margin-bottom: 18px;
  margin-right: 250px;
  margin-left: 20px;
}

.userAccountCon,
.userProjectCon,
.userTechnology,
.userResume {
  margin-top: 20px;
}
.userAccountCon span,
.userProjectCon span,
.userTechnology span,
.userResume span {
  font-size: 23px;
  color: #5e5e5e;
  line-height: 50px;
  margin-right: 250px;
  margin-left: 20px;
}

.userAccountCon p,
.userProjectCon p,
.userTechnology p,
.userResume p {
  width: 300px;
  font-size: 20px;
  margin-bottom: 15px;
  padding: 0 20px;
  line-height: 50px;
  background-color: #f2f6f7;
  color: #5e5e5e;
  margin-left: 20px;
}
/*  */

/* 个人账户 */
.btnCon {
  margin-left: 200px;
  margin-bottom: 20px;
}
.cBtn {
  background-color: #0087cf;
  color: white;
  width: 70px;
  height: 40px;
  border-radius: 10px;
}
.tBtn {
  background-color: orangered;
  color: white;
  width: 70px;
  height: 40px;
  border-radius: 10px;
}
.tPerson {
  margin-left: 15px;
  border-top: 1px solid #333;
  border-left: 1px solid #333;
}
.tPerson tr {
  height: 60px;
}
.tPerson .tHead {
  background-color: #0087cf;
  height: 40px;
}
.tPerson tr td {
  width: 130px;
  border-bottom: 1px solid #333;
  border-right: 1px solid #333;
  text-align: center;
}
/*  */

/* 项目课题中心 */
/* 发布课题或项目任务 */
.tabs {
  width: 1100px;
  margin-left: 30px;
  margin-bottom: 20px;
}
.publishBtn {
  margin: 30px;
  width: 160px;
  height: 60px;
  border-radius: 10px;
}
.el-tab-size {
  font-size: 20px;
}
/* 已发布/结束任务情况 */
.conFour {
  width: 100%;
  margin-left: 10%;
}
.conFour table {
  margin-top: 20px;
  width: 80%;
  border: 0;
}
.conFour table tr td {
  width: 30%;
  text-align: center;
}
.tbHead tr td {
  color: #0087cf;
  font-weight: 600;
  padding: 10px;
}
.tbMain td {
  font-weight: 600;
}
.line {
  width: 100%;
  border-bottom: 4px solid #0087cf;
  margin: 0;
}
.conFour .examBtn {
  width: 70px;
  height: 40px;
  border-radius: 10px;
}
/*  */

/* 技术分享 */
.rad {
  width: 15px;
  height: 15px;
  background-color: #0087cf;
  border-radius: 50%;
  float: left;
  margin-left: 20px;
  margin-top: 15px;
  margin-right: 30px;
}
.tecBtn {
  margin: 30px;
  width: 160px;
  height: 50px;
  border-radius: 10px;
}
.tecle {
  float: left;
  margin-left: 10px;
}
.tecri {
  float: right;
  margin-right: 10px;
}
.conThree {
  width: 100%;
  margin-left: 2%;
}
.conThree table {
  margin-top: 20px;
  width: 80%;
  border: 0;
}
.conThree table tr td {
  width: 33%;
  text-align: center;
}
.conTwo {
  width: 100%;
  margin-left: 2%;
}
.conTwo table {
  margin-top: 20px;
  width: 80%;
  border: 0;
}
.conTwo table tr td {
  width: 50%;
  text-align: center;
}
.endP {
  color: red;
}
.tech2 {
  margin-left: 60px;
}
.tecBtn {
  margin-top: 20px;
  margin-right: 30px;
}
.tecSel {
  color: #0087cf;
  width: 300px;
  height: 40px;
  font-size: 26px;
  border: 2px solid #0087cf;
  border-radius: 10px;
}
.backBtn {
  width: 150px;
  height: 50px;
  margin-top: 20px;
  margin-right: 100px;
  float: right;
  border-radius: 10px;
}
/*  */

/* .... */

/* 个人履历 */
.select {
  width: 400px;
  height: 300px;
  float: right;
  position: relative;
}
.select .file {
  position: absolute;
  width: 180px;
  height: 40px;
  border-radius: 5px;
  left: 200px;
}
.backBtn1 {
  position: absolute;
  width: 150px;
  height: 50px;
  left: 230px;
  bottom: 181px;
  border-radius: 10px;
}
/*  */

/* 拜师消息 */

/*  */

 .p1 {
  height: 200px;
}
</style>
